package com.marshall.scstudy.service.impl;

import com.marshall.scstudy.dao.PaymentDao;
import com.marshall.scstudy.entities.Payment;
import com.marshall.scstudy.service.PaymentService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by
 * autor : Marshall lky
 * datetime: 2021/10/29 9:31
 */
@Service
public class PaymentServiceImpl implements PaymentService {

    @Resource
    private PaymentDao paymentDao;


    @Override
    public int create(Payment payment){
        return paymentDao.create(payment);
    }

    @Override
    public Payment getPaymentById(@Param("id") Long id){
        return paymentDao.getPaymentById(id);
    }

    @Override
    public String showDatabases() {
        return paymentDao.getCurDataBaseName();
    }

}
